package com.wtb.javatool.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 菜品表
 * @author yangzhuoheng
 *
 */
@Data
@ToString
@ApiModel(value = "Dish",description="菜品")
public class Dish implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5715043674151551828L;
	@ApiModelProperty(value = "id")
	private Long id;
	@ApiModelProperty(value = "菜品名称")
	private String name;
	@ApiModelProperty(value = "菜品价格")
	private BigDecimal price;
	@ApiModelProperty(value = "菜品描述")
	private String description;
	@ApiModelProperty(value = "菜品创建时间")
	@Column(name = "create_time")
	private Date createTime;
	@ApiModelProperty(value = "菜品更新时间")
	@Column(name = "update_time")
	private Date updateTime;
	
	
	public Dish(String name, BigDecimal price, String description) {
		super();
		this.name = name;
		this.price = price;
		this.description = description;
		this.createTime = new Date();
		this.updateTime = new Date();
	}
	
	public Dish() {
		this.createTime = new Date();
		this.updateTime = new Date();
	}
	
}